package com.treasure.mall.biz.repository.marketing;

import com.treasure.mall.biz.base.JpaSearchableRepository;
import com.treasure.mall.biz.entity.marketing.RedPacketPO;
import org.springframework.stereotype.Repository;

/**
 * @author allan
 * @version 1.0.0
 * @date 2020/8/1
 */
@Repository
public interface RedPacketRepository extends JpaSearchableRepository<RedPacketPO, Long> {
    boolean existsByMerchantPO_MerchantIdAndEnabledIsTrue(Long merchantId);

    RedPacketPO findByMerchantPO_MerchantIdAndEnabledIsTrue(Long merchantId);
}
